﻿<div ng-controller="tabularEditCtrl">
    <div>
        <div>
            <button id="Add" class="btn btn-default" type="button" ng-click="add()" title="Add"><span class="glyphicon glyphicon-plus"></span></button>
        </div>
        <form class="form-horizontal" role="form" id="editPanel" name="editPanel" ng-show="isEditFormVisible">
            <div class="form-group" ng-repeat="dataitem in item.DataItems" ng-class="{'has-error' : editPanel.$valid == false}">
                <label for="name" class="col-sm-2 control-label" ng-bind="dataitem.Name"></label>
                <div class="col-sm-8">
                    <input type="hidden" class="form-control" id="id" ng-bind="dataitem.ID" ng-model="dataitem.ID" />
                    <input type="text" class="form-control" id="{{dataitem.Name}}" name="{{dataitem.Name}}" ng-bind="dataitem.Value" ng-model="dataitem.Value" ng-maxlength="150" />
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-8">
                    <button class="btn btn-default" ng-click="save()" title="Save" ><span class="glyphicon glyphicon-floppy-save"></span></button>
                    <button class="btn btn-default" ng-click="cancel()" title="Cancel" ><span class="glyphicon glyphicon-remove-sign"></span></button>
                </div>
            </div>
        </form>
    </div>
</div>
